﻿// Copyright 2010 Maxime Serrano <lastchronicler@gmail.com>

using System;
using System.IO;
using System.Text;

namespace MCSharp {
    // Basic packet, essentially a byte array
    public struct Packet {
        public byte[] data;
        public Packet(int length) {
            data = new byte[length];
        }
    }

    public enum CMSG {
        KeepAlive = 0x00,
        Login = 0x01,
        Handshake = 0x02,
        Chat = 0x03,
        Bool = 0x0A,
        Move = 0x0B,
        Look = 0x0C,
        MoveLook = 0x0D,
        BlockDig = 0x0E,
        BlockPlace = 0x0F,
        Switch = 0x10,
        ArmAnimation = 0x12,
        CollectItem = 0x16,
        DestroyEntity = 0x1D,
        Disconnect = 0xFF,
        NumCMSG = 0x100
    };

    public enum SMSG {
        KeepAlive = 0x00,
        Login = 0x01,
        Handshake = 0x02,
        Chat = 0x03,
        Time = 0x04,
        Bool = 0x0A,
        Switch = 0x10,
        AddInventory = 0x11,
        ArmAnimation = 0x12,
        NamedEntitySpawn = 0x14,
        EntitySpawn = 0x15,
        CollectItem = 0x16,
        DestroyEntity = 0x1D,
        BlockDig = 0x0E,
        BlockPlace = 0x0F,
        RelativeMove = 0x1F,
        EntityLook = 0x20,
        RelativeMoveLook = 0x21,
        Teleport = 0x22,
        PreChunk = 0x32,
        Chunk = 0x33,
        MultiBlockChange = 0x34,
        BlockChange = 0x35,
        Disconnect = 0xFF
    };
}
